// async function getProd(a, b) {
//     // return a * b
//     return new Promise(resolve => setTimeout(() => {
//         resolve(a * b)
//     }, 2000))
// }

async function getProd(a, b) {
    return new Promise(resolve => setTimeout(resolve, 2000, a * b))
}

(async () => {
    let ret;

    ret = await getProd(1, 2)
    console.log(ret);

    ret = await getProd(ret, 3)
    console.log(ret);

    ret = await getProd(ret, 4)
    console.log(ret);

    ret = await getProd(ret, 5)
    console.log("ret=", ret);
})()
